<?php

namespace App\Commons\Domain\Providers;

use Illuminate\Contracts\Support\DeferrableProvider;
use Illuminate\Support\ServiceProvider;

/**
 * 领域服务提供者
 */
class DomainServiceProvider extends ServiceProvider
{
    public $singletons = [
        \App\Commons\Domain\Module\UserCenter\Contract\AccountService::class => \App\Commons\Domain\Module\UserCenter\Service\AccountService::class,
        \App\Commons\Domain\Module\Financial\Contract\PaymentInterface::class => \App\Commons\Domain\Module\Financial\Service\PaymentService::class,

    ];

    /**
     * Bootstrap services.
     *
     * @return void
     */
    public function boot()
    {
    }

    /**
     * Register services.
     *
     * @return void
     */
    public function register()
    {
        // $services = $this->domain_services;
        // foreach ($services as $class => $names) {
        //     foreach ($names as $name) {
        //         $this->app->singleton(
        //             $name,
        //             function () use ($class) {
        //                 return resolve($class);
        //             }
        //         );
        //     }
        // }
    }
}
